home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SNNSV32.ZIP / SNNSv3.2 / xgui / sources / ui_layerP.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-25  |  1.9 KB  |  94 lines

  1. /*****************************************************************************
  2.   FILE           : ui_layerP.c
  3.   SHORTNAME      : layerP.c
  4.   SNNS VERSION   : 3.2
  5.  
  6.   PURPOSE        :
  7.   NOTES          :
  8.  
  9.   AUTHOR         : Tilman Sommer
  10.   DATE           : 31.8.1990
  11.   AUTHOR         :
  12.   DATE           :
  13.  
  14.   CHANGED BY     :
  15.   IDENTIFICATION : @(#)ui_layerP.c    1.10 3/2/94
  16.   SCCS VERSION   : 1.10
  17.   LAST CHANGE    : 3/2/94
  18.  
  19.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  20.              
  21. ******************************************************************************/
  22.  
  23.  
  24. #include <stdio.h>
  25.  
  26. #include "ui.h"
  27. #include "ui_utilP.h"
  28. #include "ui_xWidgets.h"
  29. #include "ui_layer.h"
  30. #include "ui_action.h"
  31.  
  32. #include "ui_layerP.ph"
  33.  
  34.  
  35. /*****************************************************************************
  36.   FUNCTION : ui_layer_initLayerNames
  37.  
  38.   PURPOSE  : assign initial layer names
  39.   RETURNS  : void
  40.   NOTES    :
  41.  
  42.   UPDATE   : 31.8.1990
  43. ******************************************************************************/
  44.  
  45. void ui_layer_initLayerNames(void)
  46.  
  47. {
  48.     int i;
  49.  
  50.     for (i=0; i<MAX_NO_LAYERS; i++) {
  51.     sprintf(&ui_layerNames[i][0],"LAYER %2d",i+1);
  52.     }
  53. }
  54.  
  55.  
  56. /*****************************************************************************
  57.   FUNCTION : ui_layer_setLayerNames
  58.  
  59.   PURPOSE  : copy data from widgets to the name array
  60.   RETURNS  : void
  61.   NOTES    :
  62.  
  63.   UPDATE   : 31.8.1990
  64. ******************************************************************************/
  65.  
  66. void ui_layer_setLayerNames(void)
  67.  
  68. {
  69.     int   i;
  70.     int   flagWord = 0;
  71.     int   bit = 1;
  72.     
  73.     for (i=0; i<MAX_NO_LAYERS; i++) {
  74.     ui_xStringFromAsciiWidget(ui_layerNameWidgets[i], 
  75.                   &ui_layerNames[i][0], MAX_NAME_LENGTH);
  76.     if (ui_xGetToggleState(ui_layerButtonWidgets[i]))
  77.         ui_utilSetFlag(flagWord, bit);
  78.     bit *= 2;
  79.     }
  80.     ui_layerReturnValue = (unsigned short) flagWord;
  81. }    
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92. /* end of file */
  93. /* lines: 89 */
  94.